<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
    <th:block th:include="include :: header('详情')"/>
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
    <div class="row">
        <div class="col-sm-12">
            <div class="panel panel-info">
                <div class="panel-heading">
                    <i class="fa fa-info-circle"></i> 通知详情
                </div>
                <div class="panel-body">
                    <form class="form-horizontal m-t" id="signupForm">
                        <!--主题时间类型发件人署名-->
                        <div class="form-group">
                            <label class="col-sm-3 control-label">主题 ： </label>
                            <div class="form-control-static" th:text="${notice.noticeTheme}">
                            </div>
                            <label class="col-sm-3 control-label">时间：</label>
                            <div class="form-control-static" th:text="${#dates.format(notice.noticeSendingTime,'yyyy-MM-dd HH:mm')}">
                            </div>
                            <label class="col-sm-3 control-label">通知类型：</label>
                            <div class="form-control-static"
                                 th:text="${@dict.getValueByTableAndKey('sys_notice_type',notice.noticeType)}">
                            </div>
                            <label class="col-sm-3 control-label">发件人 ：</label>
                            <div class="form-control-static" th:text="${@dingUser.getNoticeSenderValue(notice.noticeSender)}">
                            </div>
                            <label class="col-sm-3 control-label">署名 ： </label>
                            <div class="form-control-static" th:text="${notice.noticeSignature}">
                            </div>
                            <!--<label class="col-sm-3 control-label">内容 ： </label>
                            <div class="form-control-static" th:text="${notice.noticeContent}">
                            </div>-->
                        </div>
                        <!--附件-->
                        <div class="form-group" id="down-button">
                            <label class="col-sm-3 control-label">附件
                                <a href="javascript:void(0)" onclick="downloadThis()">
                                    <i class="fa fa-mouse-pointer"></i>下载
                                </a>
                            </label>
                            <div class="form-control-static" th:text="${file.fileName}"></div>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>
<th:block th:include="include :: footer"/>
<script th:inline="javascript">
    var fileRoute = [[${file.fileRoute}]];
    var prefix = ctx + "sys/common/download";
    window.onload = function () {
        if (!fileRoute) {
            document.getElementById("down-button").style.display = "none";
        }//判断有无附件，选择是否显示
    };

    function downloadThis() {
        down_url = prefix + "/" + fileRoute;
        window.open(down_url);
    }
</script>
</body>
</html>
